Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix bug to depend on class name of Fluent::Plugin::MultiOutput #1206

Merged
merged 1 commit into from
Sep 6, 2016

Conversation

tagomoris
Copy link
Member

Basically, checking objects with its class name is wrong practice in Ruby. It's should be done with method calls.
When v0.14 MultiOutput plugins are used, Plugin.new_output requires the class at first, so Fluent::Plugin::MultiOutput reference
can succeed. When v0.12 MultiOutput plugins are used, it fails.
Refenrencing classes in core code makes circular dependencies, so we should use method calls to check objects.

This change fixes #1205.

Basically, checking objects with its class name is wrong practice in Ruby. It's should be done with method calls.
When v0.14 MultiOutput plugins are used, Plugin.new_output requires the class at first, so Fluent::Plugin::MultiOutput reference
can succeed. When v0.12 MultiOutput plugins are used, it fails.
Refenrencing classes in core code makes circular dependencies, so we should use method calls to check objects.
@tagomoris tagomoris added bug Something isn't working v0.14 labels Sep 6, 2016
@tagomoris
Copy link
Member Author

@repeatedly please check this fix.

@repeatedly
Copy link
Member

LGTM

@tagomoris tagomoris merged commit 191108c into master Sep 6, 2016
@tagomoris tagomoris deleted the fix-bug-not-to-load-multi_output-in-agent branch September 6, 2016 08:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working v0.14
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unexpected error: "uninitialized constant Fluent::Plugin::MultiOutput"
2 participants